"use strict";
cc._RF.push(module, 'eead2VspLVDgbHTlh3sbX36', 'AdInterface');
// scripts/AdInterface.js

"use strict";

var e = require;
var t = module;
var o = exports;

var _ii,
    nn = void 0 && (void 0).__extends || (_ii = function ii(t, e) {
  return (_ii = Object.setPrototypeOf || {
    __proto__: []
  } instanceof Array && function (t, e) {
    t.__proto__ = e;
  } || function (t, e) {
    for (var o in e) {
      Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]);
    }
  })(t, e);
}, function (t, e) {
  function o() {
    this.constructor = t;
  }

  _ii(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o());
}),
    rr = void 0 && (void 0).__awaiter || function (t, e, o, i) {
  return new (o || (o = Promise))(function (n, a) {
    function r(t) {
      try {
        l(i.next(t));
      } catch (e) {
        a(e);
      }
    }

    function s(t) {
      try {
        l(i["throw"](t));
      } catch (e) {
        a(e);
      }
    }

    function l(t) {
      var e;
      t.done ? n(t.value) : (e = t.value, e instanceof o ? e : new o(function (t) {
        t(e);
      })).then(r, s);
    }

    l((i = i.apply(t, e || [])).next());
  });
};

var oo = void 0 && (void 0).__decorate || function (e, t, a, n) {
  var i,
      o = arguments.length,
      s = o < 3 ? t : null === n ? n = Object.getOwnPropertyDescriptor(t, a) : n;
  if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) s = Reflect.decorate(e, t, a, n);else for (var r = e.length - 1; r >= 0; r--) {
    (i = e[r]) && (s = (o < 3 ? i(s) : o > 3 ? i(t, a, s) : i(t, a)) || s);
  }
  return o > 3 && s && Object.defineProperty(t, a, s), s;
};

Object.defineProperty(o, "__esModule", {
  value: !0
});
var a = cc._decorator,
    n = a.ccclass,
    i = (a.property, function () {
  function e() {
    this.ID_Video = "", this.ID_Video_Share = "", this.ID_System_Banner = "", this.ID_System_Inters = "", this.ID_Custom_Banner = "", this.ID_Custom_Inters = "", this.ID_Native_Banner = "", this.ID_Native_Inters = "", this.ID_Native_Icon = "", this.ID_Native_Image = "", this.ID_Box_Banner = "", this.ID_Box_View = "", this.SW_Ad_Main = !1, this.SW_Video = !1, this.SW_System_Banner = !1, this.SW_System_Inters = !1, this.SW_Custom_Banner = !1, this.SW_Custom_Inters = !1, this.SW_Native_Banner = !1, this.SW_Native_Inters = !1, this.SW_Native_Icon = !1, this.SW_Native_Image = !1, this.SW_Box_Banner = !1, this.SW_Box_View = !1, this.Control_Video = !1, this.Control_Inters_To_Video_Switch = !1, this.Control_Inters_To_Video = 0, this.Control_Start_Inters_To_Video = 0, this.Control_Banner = !1, this.Control_First_Native = !1, this.Control_Banner_By_Turns = !1, this.Control_Banner_By_Turns_Num = 0, this.Control_Banner_Update = 30, this.Control_Inters = !1, this.Control_Inters_By_Turns = !1, this.Control_Inter_By_Sort = [], this.Control_Inters_By_Turns_Num = 0, this.Control_Start_Num = 0, this.Control_Interval_Num = 0, this.Control_Interval_Time = 0, this.Control_Delay_Time = 0, this.Control_Delay_Prob = 0, this.Control_Native = !1, this.Control_Native_Update = 30, this.Control_Native_Interval = !1, this.Control_Native_Interval_Num = 0, this.SW_Desk_Add = !1, this.SW_Inters_Desk = !1, this.Inters_Add_Num = 0, this.AdGroup = "", this.SW_Time_Switch = !1, this.SW_Work_Days_Switch = !1, this.Work_Days_Time = "", this.SW_Day_Off_Switch = !1, this.Day_Off_Time = "", this.Day_Off_Info = null, this.SW_Area_Switch = !1, this.Area_Open_GPS_Error = !1, this.Area_Name_List = [], this.Error_Master_Switch = !1, this.Error_Image_Switch = !1, this.Error_Image_Num = 0, this.Error_Image_Prob = 0, this.Error_Inters_Switch = !1, this.Error_Inters_Num = 0, this.Error_Inters_Prob = 0, this.Error_Custom_Switch = !1, this.Error_Custom_Num = 0, this.Error_Custom_Prob = 0, this.NUM_IntersIntervalTime = 0, this.image_error_num = 0, this.inters_error_num = 0, this.custom_error_num = 0;
  }

  return e.prototype.getNativeImageError = function () {
    var e = !1;
    return this.Error_Master_Switch && this.Error_Image_Switch ? this.Error_Image_Prob > 0 ? Math.floor(100 * Math.random()) >= this.Error_Image_Prob && (e = !0) : this.Error_Image_Num > 0 ? (this.image_error_num++, this.image_error_num >= this.Error_Image_Num && (e = !0, this.image_error_num = 0)) : 0 == this.Error_Image_Num && 0 == this.Error_Image_Prob && (e = !0) : e = !1, e;
  }, e.prototype.getNativeIntersError = function () {
    var e = !1;
    return this.Error_Master_Switch && this.Error_Inters_Switch ? this.Error_Inters_Prob > 0 ? Math.floor(100 * Math.random()) >= this.Error_Inters_Prob && (e = !0) : this.Error_Inters_Num > 0 ? (this.inters_error_num++, this.inters_error_num >= this.Error_Inters_Num && (e = !0, this.inters_error_num = 0)) : 0 == this.Error_Inters_Num && 0 == this.Error_Inters_Prob && (e = !0) : e = !1, e;
  }, e.prototype.getCustomError = function () {
    var e = !1;
    return this.Error_Master_Switch && this.Error_Custom_Switch ? this.Error_Custom_Prob > 0 ? Math.floor(100 * Math.random()) >= this.Error_Custom_Prob && (e = !0) : this.Error_Custom_Num > 0 ? (this.custom_error_num++, this.custom_error_num >= this.Error_Custom_Num && (e = !0, this.custom_error_num = 0)) : 0 == this.Error_Custom_Num && 0 == this.Error_Custom_Prob && (e = !0) : e = !1, e;
  }, e.prototype.adErrorControl = function () {
    var e = !1,
        t = new Date(),
        o = t.getDay(),
        a = t.getHours(),
        n = t.getMonth(),
        i = t.getDate();

    if (this.SW_Time_Switch) {
      var r = !1;

      if (r = -1 != [0, 6].indexOf(o), this.Day_Off_Info && (r = r ? -1 == this.Day_Off_Info[n].work_date.indexOf[i] : -1 != this.Day_Off_Info[n].date.indexOf(i)), !r && this.SW_Work_Days_Switch) {
        var s = this.Work_Days_Time.indexOf("_"),
            l = Number(this.Work_Days_Time.substring(0, s)),
            _ = Number(this.Work_Days_Time.substring(s + 1, this.Work_Days_Time.length));

        e = a >= l && a < _ || _ <= l;
      }

      if (this.SW_Day_Off_Switch && r) {
        var c = this.Day_Off_Time.indexOf("_"),
            d = Number(this.Day_Off_Time.substring(0, c)),
            h = Number(this.Day_Off_Time.substring(c + 1, this.Day_Off_Time.length));
        e = a >= d && a < h || h <= d;
      }
    } else e = !0;

    return e;
  }, oo([n], e);
}());
o["default"] = i;

cc._RF.pop();